import request from '../../utils/request'
const api_name = "comment"


export function getCommentListByBid(bid) {
    return request({
        url: `/${api_name}/commentlist/${bid}`,
        method: 'GET',
        headers: {
            action: "querycomment"
        }
    })
}

export function loadReplies(pid,pageNo,pageSize) {
    return request({
        url: `/${api_name}/replies/${pid}/${pageNo}/${pageSize}`,
        method: 'GET',
        headers: {
            action: "querycomment"
        }
    })
}

export function thumbuping(id) {
    return request({
        url: `/${api_name}/thumbs/${id}`,
        method: 'GET'
    })
}

export function add(commentVo) {
    return request({
        url: `/${api_name}/add`,
        method: 'POST',
        data:commentVo
    })
}


export function del(id) {
    return request({
        url: `/${api_name}/del/${id}`,
        method: 'DELETE'
    })
}